var gulp = require('gulp'),
    stylus = require('gulp-stylus'),
    connect = require('gulp-connect');

gulp.task('connect',function () {
    connect.server({
        port: 8000,
        livereload: true
    })
});
gulp.task('html', function () {
    gulp.src('*.html')
        .pipe(gulp.dest('/'))
        .pipe(connect.reload());
});
gulp.task('stylus', function () {
    gulp.src('css/*.styl')
        .pipe(stylus())
        .pipe(gulp.dest('css'))
        .pipe(connect.reload());
});

gulp.task('watch', function () {
    gulp.watch(['*.html'], ['html']);
    gulp.watch('css/*.styl',['stylus']);
});
gulp.task('default', ['connect','watch']);